<template>
	<view class="publish-container">
		<!-- 分类标签  -->
		<view class="category-tabs">
			<view v-for="(tab, index) in tabs" :key="index" :class="['tab-item', { active: activeTab === index }]"
				@click="handleTabClick(index)">
				{{ tab }}
			</view>
		</view>

		<!-- 公共部分：上传图片区域  -->
		<view class="upload-section">

			<!-- <view class="example-body">
				<uni-file-picker @success="uploadSuccess" limit="9" title="最多选择9张图片"  v-model="images" ></uni-file-picker>
			</view> -->

			<text class="upload-title">上传图片 (最多9张)</text>
			<view class="upload-area">
				<view v-for="(img, index) in imageUrls" :key="index" class="uploaded-image-container">
					<image :src="img" class="uploaded-image"></image>
					<view class="delete-icon" @click="removeImage(index)">×</view>
				</view>

				<view v-if="imageUrls.length < 9" class="upload-placeholder" @click="chooseImage">
					<image src="/static/fabu/xiangji.png" class="camera-icon"></image>
				</view>
			</view>

		</view>







		<!-- 公共部分：详细描述   保持不变 -->
		<view class="description-section">
			<text class="section-title">详细描述</text>


			<textarea class="description-input" placeholder="文字描述 (最多300字)" v-model="param.description" maxlength="300"
				@input="handleDescriptionInput"></textarea>
			<view class="word-count">{{ param.description.length }}/300</view>
		</view>



		<!-- 具体信息 - 根据不同分类显示不同内容 -->
		<view class="info-section">
			<text class="section-title">具体信息</text>

			<!-- 闲置台球台内容 -->
			<view v-if="activeTab === 0">
				<!-- 分类 -->
				<view class="info-row">
					<text class="info-label">分类</text>
					<view class="option-group type-options">

						<view v-for="(type, index) in types" :key="'type'+index"
							:class="['option-item', { active: selectedType === type }]" @click="selectedType = type">
							{{ type }}
						</view>
					</view>
				</view>

				<!-- 品牌 -->
				<view class="info-row">
					<text class="info-label">品牌</text>
					<input class="brand-input" placeholder="如乔氏" v-model="brand">
					<view class="option-group">

						<view v-for="(material, index) in materials" :key="'material'+index"
							:class="['option-item', { active: selectedMaterial === material }]"
							@click="selectedMaterial = material">
							{{ material }}
						</view>
					</view>
				</view>

				<!-- 年份 -->
				<view class="info-row">
					<text class="info-label">年份</text>
					<input class="year-input" placeholder="如2022" v-model="year">
					<view class="option-group">
						<view :class="['option-item', { active: yearUnknown }]" @click="yearUnknown = !yearUnknown">
							不详
						</view>
					</view>
				</view>

				<!-- 配件 -->
				<view class="info-row">
					<text class="info-label">含配件</text>
					<!-- <view class="option-group">
						<view v-for="(accessory, index) in accessories" :key="'accessory'+index"
							:class="['option-item', { active: selectedAccessory === accessory }]"
							@click="selectedAccessory = accessory">
							{{ accessory }}
						</view>
					</view> -->
					<uni-data-checkbox selectedColor="#fdad18" selectedTextColor="#fdad18" v-model="value"
						:localdata="range" @change="change"></uni-data-checkbox>

				</view>
			</view>

			<!-- 闲置球杆内容 -->
			<view v-else-if="activeTab === 1">
				<!-- 分类 -->
				<view class="info-row">
					<text class="info-label">分类</text>
					<input class="type-input" placeholder="如大头连杆通体" v-model="type">
				</view>

				<!-- 品牌 -->
				<view class="info-row">
					<text class="info-label">品牌</text>
					<input class="brand-input" placeholder="如墨子" v-model="brand">
				</view>

				<!-- 年份 -->
				<view class="info-row">
					<text class="info-label">年份</text>
					<input class="year-input" placeholder="如2022" v-model="year">
				</view>

				<!-- 成色 -->
				<view class="info-row">
					<text class="info-label">成色</text>
					<view class="option-group">
						<view v-for="(condition, index) in conditions" :key="'condition'+index"
							:class="['option-item', { active: selectedCondition === condition }]"
							@click="selectedCondition = condition">
							{{ condition }}
						</view>
					</view>
				</view>

				<!-- 磨损情况 -->
				<view class="info-row">
					<text class="info-label">磨损情况</text>
					<view class="option-group">
						<view v-for="(wear, index) in wear" :key="'wear'+index"
							:class="['option-item', { active: selectedWear === wear }]" @click="selectedWear = wear">
							{{ wear }}
						</view>

					</view>
				</view>
			</view>

			<!-- 球房转让内容 - 地址和电话 -->
			<view v-else-if="activeTab === 2">
				<!-- 球房转让 -->
			</view>

			<!-- 求购设备内容 -->
			<view v-else-if="activeTab === 3">
				<!-- 求购设备 -->
			</view>

			<!-- 公共部分：地址 -->
			<view class="info-row">
				<text class="info-label">地址</text>
				<view class="address-container">
					<!-- <view class="p-2 d-flex a-center bg-white" @click="showCityPicker">
			            <input class="px-1 font-md flex-1" type="text" disabled :value="showAddr" placeholder="请选择省市区" />
			        </view> -->

					<!-- <uni-data-picker :localdata="items" 
					popup-title="请选择地址" 
					@change="onchange" 
					@nodeclick="onnodeclick">
					</uni-data-picker> -->
					<view>
						<uni-data-picker :localdata="region" popup-title="请选择地址" v-model="selectedRegion"
							@change="onchange" @nodeclick="onnodeclick">
						</uni-data-picker>
					</view>

				</view>
				<!-- <city-picker ref="cityPicker" @onConfirm="onConfirm"></city-picker> -->

			</view>

			<!-- 详细地址（闲置台球台） -->
			<!-- <view class="info-row" v-if="activeTab === 0">
        <text class="info-label">详细地址</text>
        <input 
          class="detail-address-input" 
          placeholder="请输入街道、门牌号等详细地址" 
          v-model="selectedAddress.detailAddress"
        >
      </view> -->

			<!-- 公共部分：联系电话 -->
			<view class="info-row">
				<text class="info-label">联系电话</text>
				<input class="phone-input" placeholder="请输入电话号码" v-model="phone" type="number">
			</view>

			<!-- 价格 -->
			<view class="info-row">
				<text class="info-label">价格</text>
				<input class="price-input" placeholder="请输入价格" v-model="price" type="digit">
				<text class="price-unit">元</text>
			</view>

			<!-- 公共部分：截止日期 -->
			<view class="info-row deadline-row">
				<text class="info-label">售卖截止日期</text>
				<picker mode="date" :start="startDate" :end="endDate" @change="bindDateChange">
					<view class="picker">
						<text>{{date}}</text>
					</view>
				</picker>
				<picker mode="time" @change="bindTimeChange">
					<view class="picker">
						<text>{{time}}</text>
					</view>
				</picker>
				<view class="option-item no-deadline" :class="{ active: noDeadline }" @click="noDeadline = !noDeadline">
					不限时
				</view>
			</view>
		</view>

		<!-- 发布按钮 -->
		<view class="publish-footer">
			<view class="price-display">价格: ￥{{ price || '0.00' }}</view>
			<button class="publish-btn" @click="handlePublish">发布</button>
		</view>
	</view>
</template>

<script>
	import region from '@/components/region_data.json';
	import CustomFormData from '@/common/FormData/index.js';
	export default {
		data() {
			return {
				classes: '1-2',
				tabs: ['闲置台球台', '闲置球杆', '球房转让', '求购设备'],
				activeTab: 0, // 默认显示闲置台球台

				// 公共数据
				imageUrls: [],
				// images: [],


				descriptionLength: 0,
				address: '',
				phone: '',
				deadline: '',
				noDeadline: false,
				date: this.getCurrentDate(),
				time: this.getCurrentTime(), //当前时间

				// location: {
				// 	city: '',
				// 	district: '',
				// 	detail: '',
				// 	contact_name: ''
				// },

				startDate: this.getDate('start'),
				endDate: this.getDate('end'),

				// 闲置台球台
				types: ['美式台球', '中式台球', '斯诺克台球'],
				selectedType: '',
				brand: '',
				materials: ['钢库', '木库'],
				selectedMaterial: '',
				year: '',
				yearUnknown: false,
				value: 0,
				range: [{
					"value": 0,
					"text": "含配件"
				}, {
					"value": 1,
					"text": "裸台"
				}],
				selectedRange: '含配件',
				detailAddress: '',
				price: '',

				// 闲置球杆
				type: '',
				conditions: ['全新', '几乎全新', '轻微磨损', '严重磨损'],
				selectedCondition: '',
				wear: ['不详', '正常磨损', '严重磨损'],
				selectedWear: '',
				hasNormalWear: false,
				hasSevereWear: false,


				selectedAddress: {
					fullAddress: '',
					province: '',
					city: '',
					district: ''
				},
				selectedRegion: [],
				isSubmitting: false,


				region: [],

				param: {
					images: [],
					type: "闲置台球台",
					description: "",
					tag: "",
					brand: "",
					year: null,
					accessories: "",
					cond: "",
					wear: "",
					city: "",
					contact_phone: "",
					end_date: this.getCurrentDate(),
					price: null
				},



				images: [],


				// param: {
				// 	// images: [],
				// 	city: "上海市",
				// 	type: "闲置台球台",
				// 	description: "九成新台球台出售",
				// 	contact_phone: "15320419689",
				// 	price: "7000",
				// 	end_date: this.getCurrentDate(),
				// 	tag: "美式台球",
				// 	brand: "乔氏",
				// 	year: 2018,
				// 	accessories: "配件信息",

				// },


				// tabs: ['闲置台球台', '闲置球杆', '球房转让', '求购设备'],
				// activeTab: 0,
				// noDeadline: false
			}
		},
		created() {
			this.region = region.map(province => ({
				text: province.text,
				value: province.value,
				children: province.children || []
			}));
		},

		methods: {
			uploadSuccess(e) {
				console.log(e);
			},

			handleTabClick(index) {

				this.activeTab = index;
				switch (index) {
					case 0:
						this.param.type = "闲置台球台";
						break;
					case 1:
						this.param.type = "闲置球杆";
						break;
					case 2:
						this.param.type = "球房转让";
						break;
					case 3:
						this.param.type = "求购设备";
						break;
				}
			},

			bindDateChange(e) {
				this.date = e.target.value;
			},
			onchange(e) {

				const selected = e.detail.value.map(item => item.text);

				this.selectedAddress = {
					fullAddress: selected.join(' '),
					province: selected[0] || '',
					city: selected[1] || '',
					// district: selected[2] || ''
				};
			},

			onnodeclick() {

			},


			// 日期时间处理
			getCurrentDate() {
				const date = new Date();
				const year = date.getFullYear();
				const month = (date.getMonth() + 1).toString().padStart(2, '0');
				const day = date.getDate().toString().padStart(2, '0');
				return `${year}-${month}-${day}`;
			},

			getCurrentTime() {
				const date = new Date();
				const hours = date.getHours().toString().padStart(2, '0');
				const minutes = date.getMinutes().toString().padStart(2, '0');
				return `${hours}:${minutes}`;
			},

			getDate(type) {
				const date = new Date();
				let year = date.getFullYear();
				const month = (date.getMonth() + 1).toString().padStart(2, '0');
				const day = date.getDate().toString().padStart(2, '0');

				if (type === 'start') {
					year = year - 1;
				} else if (type === 'end') {
					year = year + 1;
				}

				return `${year}-${month}-${day}`;
			},


			// chooseImage() {
			// 	const remaining = 5 - this.imageUrls.length
			// 	uni.chooseImage({
			// 		count: remaining,
			// 		sizeType: ['compressed'],
			// 		sourceType: ['album', 'camera'],
			// 		success: (res) => {
			// 			this.imageUrls = [...this.imageUrls, ...res.tempFilePaths].slice(0, 5)
			// 		}
			// 	})
			// },
			// chooseImage() {
			// 	const token = uni.getStorageSync('token'); 
			// 	if (!token) {
			// 	        uni.showToast({ title: '请先登录', icon: 'none' });
			// 	        uni.navigateTo({ url: '/pages/my/user/index' });
			// 	        return;
			// 	    }
			// 	const remaining = 5 - this.imageUrls.length;
			// 	uni.chooseImage({
			// 		count: remaining,
			// 		sizeType: ['compressed'],
			// 		sourceType: ['album', 'camera'],
			// 		success: async(res) => {
			// 			const newUrls = [];
			// 			for (const tempPath of res.tempFilePaths){
			// 				const serveeUrl = await this.uploadFile(tempPath);
			// 				newUrls.push(serveeUrl);// 服务器返回的URL存入数组
			// 			}
			// 			this.imageUrls = [...this.imageUrls, ...newUrls].slice(0, 5);
			// 		}
			// 	});
			// },
			// uploadFile(tempPath) {
			//   return new Promise((resolve, reject) => {
			// 	  const token = uni.getStorageSync('token'); 
			//     uni.uploadFile({
			//       url: 'https://billiards.cqtrust.cn/local_trades',
			//       filePath: tempPath,
			//       name: 'file',
			//       success: (res) => {
			//         const data = JSON.parse(res.data);
			//         if(data.code === 200) {
			//           resolve(data.data.url);
			//         } else {
			//           uni.showToast({
			//             title: '上传失败',
			//             icon: 'none'
			//           });
			//           reject(new Error('上传失败'));
			//         }
			//       },
			//       fail: () => {
			//         uni.showToast({
			//           title: '上传失败',
			//           icon: 'none'
			//         });
			//         reject(new Error('上传失败'));
			//       }
			//     });  
			//   });
			// },


			chooseImage() {
				const that = this;
				const token = uni.getStorageSync('token');
				if (!token) {
					uni.showToast({
						title: '请先登录',
						icon: 'none'
					});
					uni.navigateTo({
						url: '/pages/my/user/index'
					});
					return;
				}
				const remaining = 9 - this.imageUrls.length;

				uni.chooseImage({
					count: remaining ? 1 : 0,
					sizeType: ['original', 'compressed'],
					sourceType: ['album', 'camera'],
					success: async (res) => {
						const tempFilePaths = res.tempFilePaths;

						tempFilePaths.forEach(async (res) => {
							that.imageUrls.push(res)
							const resUpload = await that.upload(that.imageUrls)
							that.param.images.push(resUpload.data.urls)
						});


					}
				});
			},

			upload(tempPath) {

				return new Promise((resolve, reject) => {
					const customFormData = new CustomFormData();
					// 添加多个文件到FormData
					tempPath.forEach((filePath, index) => {
						// 模拟构建FormData（uniapp内部实现）
						// 实际效果等价于在浏览器中:
						// formData.append('images[]', file);
						// 注意：以下写法需要后端支持这种参数解析方式
						customFormData.append('images[]', filePath);
					});

					for (const [key, value] of Object.entries(this.param)) {
						// console.log(`${key}: ${value}`);
						customFormData.append(key, value);
					}

					// console.log(customFormData)
					// for (const [key, value] of customFormData.entries()) {
					//   console.log(`${key}: ${value}`);
					//   // 如果是文件，会显示[object File]
					//   // 可进一步获取文件名：value.name
					// }
					// 添加其他文本参数

					// ...其他参数



					uni.uploadFile({
						url: 'https://billiards.cqtrust.cn/local_trades/uploadImages',
						header: {
							'Authorization': 'Bearer ' + uni.getStorageSync("token"),
							"Content-Type": "multipart/form-data",
						},
						filePath: tempPath[0],
						name: 'images[]', // 关键：后端接收多文件的字段名
						formData: customFormData, // 直接传递FormData对象
						success: (res) => {
							if (res.statusCode === 200) {
								resolve(JSON.parse(res.data));
							} else {
								reject(new Error(`上传失败: ${res.statusCode}`));
							}
						},
						fail: (err) => reject(err)
					});
				});
				// uni.uploadFile({
				// 	url: 'https://billiards.cqtrust.cn/local_trades',
				// 	filePath: tempPath,
				// 	name: 'images',
				// 	header: {
				// 		'Authorization': 'Bearer ' + uni.getStorageSync("token"),

				// 		"Content-Type": "multipart/form-data",
				// 	},
				// 	formData: this.param,
				// 	success: (res) => {
				// 		console.log(res)
				// 	},
				// 	fail: () => {}
				// });
			},

			removeImage(index) {
				this.imageUrls.splice(index, 1);
			},

			handleDescriptionInput(e) {
				this.param.description = e.detail.value;
				this.descriptionLength = e.detail.value.length;
			},

			bindTimeChange(e) {
				this.time = e.detail.value;
			},

			bindDateChange(e) {
				this.date = e.detail.value;
			},

			change(e) {
				this.selectedRange = this.range.find(item => item.value === e.detail.value).text;
			},

			// 选择省市区确认触发
			onchange(e) {
				const value = e.detail.value
				console.log('地址选择结果:', e.detail.value);
				this.param.city = value[0].text
			},

			onnodeclick(node) {},


			handlePublish() {

				// this.token = uni.getStorageSync('token');
				// console.log("this.images", this.images);

				this.$http.post("/local_trades", this.param)
					.then((res) => {
						const {
							code,
							msg,
							data
						} = res;
						uni.showToast({
							title: msg,
							icon: 'none'
						});
						if (code == 1 || code == 200) {
							if (data && data.length > 0) {
								this.handlePublish = data;
							}
							return Promise.resolve(true);
						}
						return Promise.reject(false);
					})
					.catch((res) => {
						return Promise.reject(false);
					});


				if (!this.validateForm()) return

				uni.showToast({
					title: '发布成功',
					icon: 'success'
				})
			},

			validateForm() {
				if (!this.param.images || this.param.images.length === 0) {
					uni.showToast({
						title: '请上传图片',
						icon: 'none'
					});
					return false;
				}

				if (!this.param.description) {
					uni.showToast({
						title: '请输入描述',
						icon: 'none'
					})
					return false
				}

				if (!this.phone) {
					uni.showToast({
						title: '请输入联系电话',
						icon: 'none'
					})
					return false
				}

				// 闲置台球台和闲置球杆价格
				if ((this.activeTab === 0 || this.activeTab === 1) && !this.price) {
					uni.showToast({
						title: '请输入价格',
						icon: 'none'
					})
					return false
				}


				// 闲置台球台详细地址
				if (!this.selectedAddress || !this.selectedAddress.fullAddress) {
					uni.showToast({
						title: '请选择地址',
						icon: 'none'
					});
					return false;
				}

				// 闲置台球台详细地址验证
				if (this.activeTab === 0 && !this.selectedAddress.detailAddress) {
					uni.showToast({
						title: '请输入详细地址',
						icon: 'none'
					});
					return false;
				}
				return true;
			},
			onLoad() {
				this.$http.get("/users", {}).then((res) => {
					console.log(res);
				});
			},

			onShow() {
				this.handlePublish();
			}
		},
	}
</script>


<style lang="scss" scoped>
	.publish-container {
		padding: 20rpx;
		background-color: #f5f5f5;
	}

	.category-tabs {
		display: flex;
		margin-bottom: 30rpx;

		.tab-item {
			flex: 1;
			text-align: center;
			padding: 15rpx 0;
			font-size: 30rpx;
			color: #666;
			border-bottom: 4rpx solid transparent;

			&.active {
				color: #fdad18;
				border-bottom-color: #fdad18;
				font-weight: bold;
			}
		}
	}

	.section-title {
		font-size: 32rpx;
		font-weight: bold;
		margin: 20rpx 0;
		color: #333;
	}

	.upload-section {
		margin-bottom: 30rpx;

		.upload-title {
			display: block;
			margin-bottom: 15rpx;
			font-size: 32rpx;
			font-weight: bold;
			color: #333;
		}

		.upload-area {
			width: 100%;
			min-height: 200rpx;
			background-color: #fff;
			border-radius: 10rpx;
			display: flex;
			flex-wrap: wrap;
			padding: 10rpx;
			box-sizing: border-box;

			.uploaded-image-container {
				width: 200rpx;
				height: 200rpx;
				margin: 10rpx;
				position: relative;

				.uploaded-image {
					width: 100%;
					height: 100%;
					border-radius: 8rpx;
				}

				.delete-icon {
					position: absolute;
					top: -10rpx;
					right: -10rpx;
					width: 40rpx;
					height: 40rpx;
					background-color: #ff5500;
					color: white;
					border-radius: 50%;
					text-align: center;
					line-height: 40rpx;
					font-size: 30rpx;
				}
			}

			.upload-placeholder {
				width: 200rpx;
				height: 200rpx;
				margin: 10rpx;
				display: flex;
				justify-content: center;
				align-items: center;
				background-color: #f9f9f9;
				border-radius: 8rpx;

				.camera-icon {
					width: 80rpx;
					height: 80rpx;
					opacity: 0.5;
				}
			}
		}
	}

	.description-section {
		margin-bottom: 30rpx;
		position: relative;

		.description-input {
			width: 100%;
			height: 200rpx;
			background-color: #fff;
			border-radius: 10rpx;
			padding: 20rpx;
			font-size: 28rpx;
			box-sizing: border-box;
		}

		.word-count {
			position: absolute;
			right: 20rpx;
			bottom: 10rpx;
			font-size: 24rpx;
			color: #999;
		}
	}

	.info-section {
		background-color: #fff;
		border-radius: 10rpx;
		padding: 20rpx;
		margin-bottom: 30rpx;
		width: 90%;
		margin-left: auto;
		margin-right: auto;

		.info-row {
			display: flex;
			align-items: center;
			margin-bottom: 25rpx;

			.info-label {
				width: 150rpx;
				font-size: 28rpx;
				color: #666;
				flex-shrink: 0;
			}

			.option-group {
				display: flex;
				flex: 1;
				flex-wrap: wrap;

				.option-item {
					padding: 10rpx 20rpx;
					margin-right: 15rpx;
					margin-bottom: 10rpx;
					font-size: 26rpx;
					border: 1rpx solid #ddd;
					border-radius: 6rpx;

					&.active {
						background-color: #fdad18;
						color: #fff;
						border-color: #fdad18;
					}
				}

				&.type-options {
					flex-wrap: nowrap;
					overflow-x: auto;

					.option-item {
						white-space: nowrap;
						margin-right: 10rpx;
						flex-shrink: 0;
					}
				}
			}

			.brand-input,
			.type-input,
			.year-input,
			.phone-input,
			.price-input,
			.detail-address-input {
				flex: 1;
				height: 60rpx;
				padding: 0 15rpx;
				font-size: 28rpx;
				border-bottom: 1rpx solid #eee;
			}

			.price-unit {
				margin-left: 10rpx;
				font-size: 28rpx;
				color: #333;
			}

			.address-picker,
			.date-picker {
				flex: 1;

				.picker-text {
					height: 60rpx;
					line-height: 60rpx;
					font-size: 28rpx;
					color: #333;
				}
			}

			// .address-info {
			// 	display: flex;
			// 	flex-direction: column;
			// 	flex: 1;
			// }

			// .address-text {
			// 	font-size: 28rpx;
			// 	color: #333;
			// 	margin-bottom: 10rpx;
			// }

			// .contact-info {
			// 	display: flex;
			// 	gap: 20rpx;
			// 	font-size: 24rpx;
			// 	color: #666;
			// }

			.placeholder1 {
				flex: 1;
				color: #000000;
				display: flex;
				justify-content: left;
				align-items: center;
			}

			// .placeholder2 {
			//   flex: 1;
			//   color: #666666;
			//   display:flex;
			//   justify-content: right;
			//   align-items: center;
			// }
			.location-icon {
				width: 40rpx;
				height: 40rpx;
				margin-left: 15rpx;
			}

			&.deadline-row {
				.info-label {
					width: auto;
					margin-right: 20rpx;
				}

				.date-picker {
					flex: 0 0 auto;
					margin-right: 20rpx;
				}

				.picker {
					display: flex;
					align-items: center;

					text {
						&:last-child {
							margin-right: 35rpx;
						}
					}
				}

				.picker+.picker {
					margin-left: 9rpx;
				}

				.no-deadline {
					margin-left: 0;
				}
			}
		}
	}

	.example-body {
		padding: 10px;
		padding-top: 0;
	}

	.custom-image-box {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}

	.text {
		font-size: 14px;
		color: #333;
	}

	.title {
		font-size: 14px;
		font-weight: bold;
		margin: 20px 0 5px 0;
	}

	.data-pickerview {
		height: 400px;
		border: 1px #e5e5e5 solid;
	}

	.popper__arrow {
		top: -6px;
		left: 50%;
		margin-right: 3px;
		border-top-width: 0;
		border-bottom-color: #EBEEF5;
	}

	.popper__arrow {
		top: -6px;
		left: 50%;
		margin-right: 3px;
		border-top-width: 0;
		border-bottom-color: #EBEEF5;
	}

	.publish-footer {
		width: 90%;
		margin-left: auto;
		margin-right: auto;
		display: flex;
		flex-direction: column;
		padding: 20rpx;
		background-color: #fff;
		border-radius: 10rpx;

		.price-display {
			font-size: 36rpx;
			color: #ff5500;
			font-weight: bold;
			text-align: center;
			margin-bottom: 20rpx;
		}

		.publish-btn {
			background-color: #fdad18;
			color: #fff;
			font-size: 32rpx;
			border-radius: 50rpx;
			padding: 0 60rpx;
			height: 80rpx;
			line-height: 80rpx;

			&::after {
				border: none;
			}
		}
	}
</style>